Don't hang when display objects are displaced by line or wrap-prefixes
authorPo Lu <luangruo@yahoo.com>
Wed, 31 Jan 2024 06:34:19 +0000 (14:34 +0800)
committerPo Lu <luangruo@yahoo.com>
Wed, 31 Jan 2024 06:50:37 +0000 (14:50 +0800)
commit5f24c9a4c82f7106e22cac8a5201db8307239837
tree74f675902ffa4ce4d1b5003dfdfe0896c3d246e3
parentf63bcf2dfeb26de511f468adc237e6ea8a3cb6cc
Don't hang when display objects are displaced by line or wrap-prefixes

This fixes a hang that would frequently rear its ugly head while
displaying messages in the `telega.el' instant messenger client,
which inserts images approaching the width of the window with
line and wrap prefixes.

* src/xdisp.c (move_it_in_display_line_to): If a line or wrap
prefix is set in place, do not generate continuation lines until
a minimum of one glyph has been produced outside that prefix.
(move_it_to): Remove the previous workaround that could not
recover from errors caused by display strings.
(display_line): Synchronize with move_it_in_display_line_to;
remove old workaround that only provided for oversized wrap
prefixes comprising `space' display objects.
src/xdisp.c